package com.itheime.homework05;

import java.io.*;

public class FileWriterTest03 {
    public static void main(String[] args) {
        try (
                BufferedWriter bos = new BufferedWriter(new FileWriter("d:/test/t.txt"));
        ) {

            bos.write("登鹳雀楼");
            bos.newLine();
            bos.write("王之涣");
            bos.newLine();
            bos.write("白日依山尽，");
            bos.newLine();
            bos.write("黄河入海流。");
            bos.newLine();
            bos.write("欲穷千里目，");
            bos.newLine();
            bos.write("更上一层楼。");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
